//字面量
let b:'male'|'female'//联合类型 b只能是这两个值
b = 'male'
b = 'female'
// b = 'hello'//报错
//=====================================
let c:any//任意类型 相当于关闭了类型检查
let p//隐式any
c = 50
c = 'hello'
c = true
//=====================================
let e:unknown
e = 10
e = true
e = 'hello'
let s:string
s = c//不报错
// s = e//报错   unknown(安全)类型和any类型的区别
//=====================================
//断言
s = e as string //告诉编译器e是string类型
s = <string>e//等效↑
//=====================================




